package com.baggio.locationex.location.gaode;

import android.content.Context;

import com.amap.api.location.AMapLocationClient;
import com.baggio.locationex.MainActivityCallback;
import com.baggio.locationex.location.BgLocationInterface;
import com.baggio.locationex.location.BgLocationListener;

public class GaodeLocation implements BgLocationInterface {

    public AMapLocationClient locationClient = null;
    private BgLocationListener myListener = null;

    public GaodeLocation(MainActivityCallback callback) {
        myListener = new BgLocationListener(callback);
    }

    @Override
    public int Initialize(Context context) {
        locationClient = new AMapLocationClient(context);
        locationClient.setLocationListener(myListener);

        // 设置定位参数

        return 0;
    }

    @Override
    public void Start() {
        locationClient.startLocation();
    }

    @Override
    public void Stop() {
        locationClient.stopLocation();
    }
}
